﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UnityEngine;

using Robotlegs.Bender.Extensions.EventManagement.API;
using Robotlegs.Bender.Framework.API;
using Robotlegs.Bender.Framework.Impl;
using Robotlegs.Bender.Platforms.Unity.Extensions.ContextViews.Impl;
using Robotlegs.Bender.Platforms.Unity.Bundles;

public class GameContext
{
    private static Context content;

    public static void InitRobotLegs(Transform rootTransform)
    {
        content = new Context();
        content.Install<UnitySingleContextBundle>();
        content.Configure(new TransformContextView(rootTransform));
        content.Configure<SceneConfig>();
        content.Configure<StartUpConfig>();
        content.Configure<MainUIConfig>();
        content.Initialize();
    }

    public static IDispatcher dispatcher
    {
        get
        {
            return content.injector.GetInstance<IEventDispatcher>();
        }
    }

}
